package com.dao.sale; 

import com.model.sale.SaleDeliveryOrdersModel; 
import java.sql.SQLException;
import java.util.List; 
import java.util.Map; 
import org.apache.ibatis.annotations.Param; 

public interface SaleDeliveryOrdersDao  { 

	/**
	 * 新增
	 * 
	 * @author chenjun
	 * @date 2022/03/10
	 **/
	int insert(SaleDeliveryOrdersModel saleDeliveryOrdersModel);

	
	int deleteByDeliId(String deliId);
	
	List<SaleDeliveryOrdersModel> selectByDeliId(String deliId);
	int deleteByOrderNo(String orderNo);
	
	List<SaleDeliveryOrdersModel> selectByOrderNo(String orderNo);
	
	/**
	 * 刪除
	 * 
	 * @author chenjun
	 * @date 2022/03/10
	 **/
	int delete(@Param("deliId")String deliId,@Param("orderNo")String orderNo);

	/**
	 * 更新
	 * 
	 * @author chenjun
	 * @date 2022/03/10
	 **/
	int update(SaleDeliveryOrdersModel saleDeliveryOrdersModel);

	/**
	 * 查询 根据主键 id 查询
	 * 
	 * @author chenjun
	 * @date 2022/03/10
	 **/
	SaleDeliveryOrdersModel load(@Param("deliId")String deliId);


	// 列表
	List<SaleDeliveryOrdersModel> selectList(Map<String, Object> map);

	// 列表总数
	int selectListCount(Map<String, Object> map);
	// 根据交货单号查询交货单信息
	/**
	 * 查询 根据主键 id 查询
	 *
	 * @author chenjun
	 * @date 2022/03/10
	 **/
	SaleDeliveryOrdersModel loadByOrderNo(@Param("orderNo")String orderNo);
	
	// 更新各项费用完成状态
	int updateCostStatus(SaleDeliveryOrdersModel saleDeliveryOrdersModel);

}